package com.mingqijia.gassafety.console.starter;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * 启动类
 */
//@EnableApolloConfig
@SpringBootApplication(scanBasePackages = { "com.mingqijia.gassafety.authority", "com.mingqijia.gassafety.console",
        "com.mingqijia.gassafety.shared", "com.mingqijia.gassafety.db", "com.mingqijia.gassafety.webserver", 
        "com.mingqijia.gassafety.statistics" },
        exclude = DruidDataSourceAutoConfigure.class)
@MapperScan("com.mingqijia.gassafety.db.mapper.**")
@EnableDiscoveryClient
@EnableFeignClients("com.mingqijia.gassafety.webserver.feign")
@EnableAspectJAutoProxy
public class SafetyApplication {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(SafetyApplication.class);
        springApplication.addListeners(new ApplicationPidFileWriter());
        springApplication.run(args);
    }
}
